package Test;

public class ThreadClass
{
    public static void main (String[] args)
    {
        System.out.println(Thread.currentThread().getName() + "开始启动...");
        
        new Thread(() ->
        {
            for(int i = 0; i < 10; i++)
            {
                System.out.println(i);
    
                try
                {
                    Thread.sleep(100);
                }
                catch(InterruptedException e)
                {
                    e.printStackTrace();
                }
            }
        }, "ThreadClass").start();
        
        System.out.println(Thread.currentThread().getName() + "结束...");
    }
}
